home *** CD-ROM | disk | FTP | other *** search
- on MAmovie
- global MAmenuList, MAnewGame, MASavedList, gHSState, gMAnextLev, gMAmenu, gMAgameMarker, gMALev, gMAsound, gMAflip, MAflavor
- EnableIdleAnim(47, 48)
- set the visible of sprite 44 to 0
- set MAmenuList to [[#menu1a, #menu2a, #menu3a], [#menu1b, #menu2b, #menu3b], [#menu1c, #menu2c, #menu3c], [#menu1d, #menu2d, #menu3d]]
- set the keyDownScript to "MAcheckKey"
- set the text of cast "guessField" to " "
- set the textSize of field "guessField" to 12
- set the text of cast "guessField" to EMPTY
- set MASavedList to []
- set temp to HSStateGet("MA", "savedList")
- set MASavedList to value(temp)
- if listp(MASavedList) = 0 then
- set MAnewGame to 1
- set gMAgameMarker to 0
- set gMALev to 1
- set gMAnextLev to 1
- set gMAsound to 1
- set gMAflip to 1
- set MAflavor to getAt(MAmenuList, 1)
- set gMAmenu to the number of cast "menu1a"
- MAinitGame()
- end if
- if listp(MASavedList) = 1 then
- MAgetStates()
- MAinitGame()
- end if
- end
-
- on MAdoConButtons
- global gMAmenu, gMAcurrAth, gMAsound, gMAflip, gMALev, MAflavor, gMAnextLev, MAclearedGrid
- repeat while (the mouseH > 0) and (the mouseH < 640) and (the mouseV < 16)
- if (the mouseH > 0) and (the mouseH < 640) and (the mouseV < 16) then
- set the castNum of sprite 44 to gMAmenu
- end if
- set the visible of sprite 44 to 1
- repeat while (the mouseH > 0) and (the mouseH < 102) and (the mouseV < 16)
- if (the mouseH > 0) and (the mouseH < 102) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "how-hi.btn"
- end if
- updateStage()
- if the mouseDown then
- LaunchHelp()
- exit repeat
- end if
- end repeat
- repeat while (the mouseH > 115) and (the mouseH < 205) and (the mouseV < 16)
- if (the mouseH > 115) and (the mouseH < 205) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "new puz-hi.btn"
- end if
- updateStage()
- if the mouseDown then
- go("gameFrame")
- updateStage()
- HSStatePut("ma", "not1stTime", "1")
- set the text of cast "guessField" to EMPTY
- MAinitGame()
- goSetUp(1)
- setUpCards(1)
- set the visible of sprite 44 to 0
- exit repeat
- end if
- end repeat
- repeat while (the mouseH > 225) and (the mouseH < 315) and (the mouseV < 16)
- if (the mouseH > 225) and (the mouseH < 315) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "solve-hi.btn"
- end if
- updateStage()
- if the mouseDown then
- puppetSprite(40, 1)
- set the text of cast "guessField" to gMAcurrAth
- repeat with I = 16 to 39
- puppetSprite(I, 0)
- end repeat
- set MAclearedGrid to list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- MAshowLetters()
- MAdoHistory()
- set the visible of sprite 44 to 0
- exit repeat
- end if
- end repeat
- repeat while (the mouseH > 330) and (the mouseH < 420) and (the mouseV < 16) and (the mouseDown = 0)
- if gMAnextLev = 1 then
- if (the mouseH > 330) and (the mouseH < 420) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "lev01-hi.btn"
- end if
- updateStage()
- end if
- if gMAnextLev = 2 then
- if (the mouseH > 330) and (the mouseH < 420) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "lev02-hi.btn"
- end if
- updateStage()
- end if
- if gMAnextLev = 3 then
- if (the mouseH > 330) and (the mouseH < 420) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "lev03-hi.btn"
- end if
- updateStage()
- end if
- if the mouseDown then
- set gMAnextLev to gMAnextLev + 1
- if gMAnextLev > 3 then
- set gMAnextLev to 1
- end if
- set gMAmenu to the number of cast string(getAt(MAflavor, gMAnextLev))
- if gMALev = 10 then
- set gMALev to 2
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- if gMALev = 20 then
- set gMALev to 3
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- if gMALev = 30 then
- set gMALev to 1
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- updateStage()
- end if
- end repeat
- repeat while (the mouseH > 435) and (the mouseH < 530) and (the mouseV < 16) and (the mouseDown = 0)
- if gMAsound = 1 then
- if (the mouseH > 435) and (the mouseH < 530) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "sound on-hi.btn"
- end if
- end if
- if gMAsound = 0 then
- if (the mouseH > 435) and (the mouseH < 530) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "sound off-hi.btn"
- end if
- end if
- updateStage()
- if the mouseDown then
- if gMAsound = 1 then
- set gMAsound to 0
- set the soundEnabled to 0
- if gMAflip = 1 then
- set MAflavor to getAt(MAmenuList, 2)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- if gMAflip = 0 then
- set MAflavor to getAt(MAmenuList, 4)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- end if
- if gMAsound = 0 then
- set gMAsound to 1
- set the soundEnabled to 1
- if gMAflip = 1 then
- set MAflavor to getAt(MAmenuList, 1)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- if gMAflip = 0 then
- set MAflavor to getAt(MAmenuList, 3)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- end if
- updateStage()
- end if
- end repeat
- repeat while (the mouseH > 540) and (the mouseH < 640) and (the mouseV < 16) and (the mouseDown = 0)
- if gMAflip = 1 then
- if (the mouseH > 540) and (the mouseH < 640) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "flip on-hi.btn"
- end if
- end if
- if gMAflip = 0 then
- if (the mouseH > 540) and (the mouseH < 640) and (the mouseV < 16) then
- set the castNum of sprite 45 to the number of cast "flip off-hi.btn"
- end if
- end if
- updateStage()
- if the mouseDown then
- if gMAflip = 1 then
- set gMAflip to 0
- if gMAsound = 1 then
- set MAflavor to getAt(MAmenuList, 3)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- if gMAsound = 0 then
- set MAflavor to getAt(MAmenuList, 4)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- end if
- if gMAflip = 0 then
- set gMAflip to 1
- if gMAsound = 1 then
- set MAflavor to getAt(MAmenuList, 1)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- if gMAsound = 0 then
- set MAflavor to getAt(MAmenuList, 2)
- set gMAmenu to the number of cast string(getAt(MAflavor, gMALev))
- exit repeat
- end if
- end if
- updateStage()
- end if
- end repeat
- end repeat
- repeat while (the mouseH > 0) and (the mouseH < 60) and (the mouseV > 420)
- if (the mouseH > 0) and (the mouseH < 60) and (the mouseV > 420) then
- set the castNum of sprite 41 to the number of cast "back-hi.btn"
- end if
- updateStage()
- if the mouseDown then
- MAleaveGame()
- updateStage()
- end if
- end repeat
- repeat while (the mouseH > 575) and (the mouseH < 630) and (the mouseV > 420)
- if (the mouseH > 575) and (the mouseH < 630) and (the mouseV > 420) then
- set the castNum of sprite 41 to the number of cast "si kids-hi.btn"
- end if
- if the mouseDown then
- updateStage()
- end if
- end repeat
- repeat while (the mouseH > 361) and (the mouseH < 455) and (the mouseV > 455)
- if (the mouseH > 361) and (the mouseH < 455) and (the mouseV > 455) then
- set the castNum of sprite 41 to the number of cast "guess-hi.btn"
- end if
- updateStage()
- if the mouseDown then
- MAdoGuess()
- updateStage()
- end if
- end repeat
- set the visible of sprite 44 to 0
- end
-
- on MAcheckKey
- if (the key = RETURN) or (the key = ENTER) then
- MAdoGuess()
- end if
- if (the text of cast "guessField" = RETURN) or (the text of cast "guessField" = ENTER) then
- set the text of cast "guessField" to EMPTY
- end if
- end
-
- on MAdoGuess
- global gMAcurrAth, gMAgameMarker, MAclearedGrid
- if the text of cast "guessField" = gMAcurrAth then
- set gMAgameMarker to gMAgameMarker + 1
- repeat with vMAi = 16 to 39
- set the loc of sprite vMAi to point(-500, -500)
- puppetSprite(vMAi, 0)
- end repeat
- set MAclearedGrid to list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- MAshowLetters()
- MAdoHistory()
- else
- beep()
- set the selStart to 0
- set the text of cast "guessField" to EMPTY
- put EMPTY before char 1 of field "guessField"
- end if
- end
-
- on MAdoHistory
- global gMAathStr
- puppetSprite(42, 1)
- puppetSprite(43, 1)
- set the stretch of sprite 43 to 0
- set the locH of sprite 42 to 320
- set the locV of sprite 42 to 240
- set the locH of sprite 43 to 200
- set the locV of sprite 43 to 242
- set the trails of sprite 43 to 1
- set the castNum of sprite 43 to the number of cast string("HS" & gMAathStr & ".pct")
- updateStage()
- set the trails of sprite 43 to 0
- set the locH of sprite 43 to 286
- set the locV of sprite 43 to 170
- set the castNum of sprite 43 to the number of cast string("MA" & gMAathStr)
- updateStage()
- end
-
- on MAtimer ticks
- startTimer()
- repeat while the timer < ticks
- nothing()
- end repeat
- end
-
- on MAturnPuppets aMAlow, aMAhigh, aMAway
- repeat with N = aMAlow to aMAhigh
- puppetSprite(N, aMAway)
- end repeat
- end
-
- on MAturnVisible aMAlow, aMAhigh, aMAway
- repeat with N = aMAlow to aMAhigh
- MAturnPuppets(N, N, aMAway)
- set the visible of sprite N to aMAway
- end repeat
- end
-
- on MAinitGame
- global gMAnextLev, gMALev, MAgridList, gMAlowSprite, gMAhighSprite, gMAlowLetterSprite, gMAmatch, MAclearedGrid
- if gMAnextLev > 0 then
- set gMALev to gMAnextLev
- else
- set gMALev to 1
- end if
- MAallOFF()
- doMAathList()
- set MAgridList to [point(77, 55), point(174, 55), point(271, 55), point(368, 55), point(465, 55), point(562, 55), point(77, 156), point(174, 156), point(271, 156), point(368, 156), point(465, 156), point(562, 156), point(77, 257), point(174, 257), point(271, 257), point(368, 257), point(465, 257), point(562, 257), point(77, 358), point(174, 358), point(271, 358), point(368, 358), point(465, 358), point(562, 358)]
- set gMAlowSprite to 16
- set gMAhighSprite to 39
- set gMAlowLetterSprite to 2
- set gMAmatch to EMPTY
- set MAclearedGrid to list()
- repeat with N = 1 to 24
- append(MAclearedGrid, 1)
- end repeat
- MAdoAnimList()
- end
-
- on MAsetTile aMAwhichTile, aMAwhatNum
- global gMAlowSprite, MAgridList
- puppetSprite(aMAwhichTile + gMAlowSprite - 1, 1)
- set the castNum of sprite (aMAwhichTile + gMAlowSprite - 1) to cast aMAwhatNum
- set the loc of sprite (aMAwhichTile + gMAlowSprite - 1) to getAt(MAgridList, aMAwhichTile)
- end
-
- on MAunCover aMAwhichOne, aMAcolor
- global gMAmatch, gMAlowSprite, gMAoldOne, MAanswergridList, MAclearedGrid, gOldvRot, gMAflip, MAanimList
- set aMAplaceOnGrid to aMAwhichOne - gMAlowSprite + 1
- MAdoAnim(aMAplaceOnGrid, aMAcolor, 0)
- if gMAmatch = EMPTY then
- set gMAmatch to getAt(MArandomGridlist, aMAplaceOnGrid)
- set gMAoldOne to aMAwhichOne
- set gOldvRot to integer(aMAcolor)
- else
- MAtimer(40)
- set aMAright to MAcheckMatch(getAt(MArandomGridlist, aMAplaceOnGrid), gMAmatch)
- if aMAright = 1 then
- setAt(MAclearedGrid, aMAwhichOne - gMAlowSprite + 1, 0)
- setAt(MAclearedGrid, gMAoldOne - gMAlowSprite + 1, 0)
- MAshowLetters()
- if the castNum of sprite 1 = 8 then
- set the castNum of sprite 1 to 13
- else
- set the castNum of sprite 1 to 8
- end if
- updateStage()
- set the locH of sprite aMAwhichOne to -2000
- set the locH of sprite gMAoldOne to -2000
- else
- put aMAcolor
- MAdoAnim(aMAplaceOnGrid, aMAcolor, 1)
- set vRot to integer(aMAcolor)
- MAsetTile(aMAwhichOne - gMAlowSprite + 1, getAt(getAt(MAanimList, vRot), 1))
- put aMAcolor
- MAdoAnim(gMAoldOne - gMAlowSprite + 1, aMAcolor, 1)
- MAsetTile(gMAoldOne - gMAlowSprite + 1, getAt(getAt(MAanimList, gOldvRot), 1))
- put aMAcolor
- end if
- set gMAmatch to EMPTY
- end if
- end
-
- on MAdoAnim aMAwhere, aMAwhichColor, aMAbackward
- global MAanswergridList, MAanimList, gMAlowSprite, gMAflip
- if gMAflip = 1 then
- if aMAbackward = 1 then
- repeat with N = 6 down to 2
- MAsetTile(aMAwhere, getAt(getAt(MAanimList, aMAwhichColor), N))
- updateStage()
- MAtimer(3)
- end repeat
- else
- repeat with N = 1 to 6
- MAsetTile(aMAwhere, getAt(getAt(MAanimList, aMAwhichColor), N))
- updateStage()
- MAtimer(5)
- end repeat
- set the trails of sprite (aMAwhere + gMAlowSprite - 1) to 1
- MAsetTile(aMAwhere, getAt(getAt(MAanimList, aMAwhichColor), 7))
- updateStage()
- MAsetTile(aMAwhere, getProp(MAuniqueIconList, getaProp(MAanswergridList, aMAwhere)))
- end if
- set the trails of sprite (aMAwhere + gMAlowSprite - 1) to 0
- updateStage()
- end if
- if gMAflip = 0 then
- set the trails of sprite (aMAwhere + gMAlowSprite - 1) to 1
- MAsetTile(aMAwhere, getAt(getAt(MAanimList, aMAwhichColor), 7))
- updateStage()
- MAsetTile(aMAwhere, getProp(MAuniqueIconList, getaProp(MAanswergridList, aMAwhere)))
- set the trails of sprite (aMAwhere + gMAlowSprite - 1) to 0
- updateStage()
- end if
- end
-
- on MAcheckMatch aMAisThis, aMAthis
- set aMAright to 0
- if aMAisThis = aMAthis then
- set aMAright to 1
- else
- beep()
- set aMAright to 0
- end if
- return aMAright
- end
-
- on MAshowLetters
- global gMAcurrAth, MAanswergridList, MAclearedGrid, gMAlowLetterSprite, gMAcurNameLength, gMALev, gMAblanks, gMAspacelessName
- repeat with N = 1 to 24
- if getAt(MAclearedGrid, N) = 0 then
- repeat with X = 1 to gMAcurNameLength + gMAblanks
- if gMALev <> 2 then
- if char X of gMAcurrAth = string(getAt(MAanswergridList, N)) then
- if gMALev < 3 then
- puppetSprite(X + gMAlowLetterSprite - 1, 1)
- set the castNum of sprite (X + gMAlowLetterSprite - 1) to cast getAt(MAanswergridList, N)
- end if
- if gMALev > 2 then
- set the loc of sprite (X + gMAlowLetterSprite - 1) to point(5 + (X * 33), 459)
- end if
- end if
- end if
- if gMALev = 2 then
- if char X of gMAspacelessName = string(getAt(MAanswergridList, N)) then
- puppetSprite(X + gMAlowLetterSprite - 1, 1)
- set the castNum of sprite (X + gMAlowLetterSprite - 1) to cast getAt(MAanswergridList, N)
- end if
- end if
- end repeat
- end if
- end repeat
- end
-
- on makeAnswerGridList fromWhatList
- global MAuniqueIconList
- set thisList to list()
- repeat with N = 1 to 24
- if getAt(fromWhatList, N) > 0 then
- append(thisList, string(getPropAt(MAuniqueIconList, getAt(fromWhatList, N))))
- next repeat
- end if
- append(thisList, 0)
- end repeat
- return thisList
- end
-
- on makeRandomGrid withHowMany
- set usedList to [:]
- repeat with N = 1 to 24
- addProp(usedList, N, 0)
- end repeat
- set N to 1
- repeat while N < (withHowMany + 1)
- set try to EMPTY
- repeat while try = EMPTY
- set try to random(24)
- if getAt(usedList, try) = 0 then
- setAt(usedList, try, N)
- set try to EMPTY
- repeat while try = EMPTY
- set try to random(24)
- if getAt(usedList, try) = 0 then
- setAt(usedList, try, N)
- set N to N + 1
- next repeat
- end if
- set try to EMPTY
- end repeat
- next repeat
- end if
- set try to EMPTY
- end repeat
- end repeat
- return usedList
- end
-
- on MAallOFF
- MAturnPuppets(1, 48, 1)
- MAturnVisible(1, 48, 1)
- MAturnPuppets(1, 48, 0)
- end
-
- on tellLoc
- repeat with N = 16 to 39
- put the loc of sprite N
- end repeat
- end
-
- on goSetUp MAnewGame
- global MAgridList, gMAlowSprite, gMAlowLetterSprite, gMAcurrAth, MAathList, MAunusedAthList, gMAcurNameLength, gMAblanks, gMAcurrAthNum, MAuniqCharList, gMAspacelessName, MAflavor, MAmenuList, mouseUp, gMAnextLev, gMAathStr, mouseUp, gMALev
- set gMALev to gMAnextLev
- if MAnewGame = 1 then
- set MAunusedAthList to value(string(MAathList))
- set N to count(MAunusedAthList)
- set vMArandomAthlete to random(N)
- set gMAcurrAth to getPropAt(MAunusedAthList, vMArandomAthlete)
- set gMAcurrAthNum to getAt(MAunusedAthList, vMArandomAthlete)
- set MAflavor to getAt(MAmenuList, 1)
- end if
- set gMAspacelessName to gMAcurrAth
- repeat with I = 1 to length(gMAspacelessName)
- if char I of gMAspacelessName = " " then
- delete char I of gMAspacelessName
- end if
- end repeat
- if gMALev = 2 then
- set vMAname to gMAspacelessName
- set vMAnum to length(gMAspacelessName)
- set X to EMPTY
- repeat with I = 1 to length(gMAspacelessName)
- set N to random(vMAnum)
- set X to char N of vMAname
- delete char N of vMAname
- set vMAscrambledName to string(vMAscrambledName & X)
- set vMAnum to vMAnum - 1
- end repeat
- set gMAspacelessName to vMAscrambledName
- end if
- set gMAathStr to string(gMAcurrAthNum)
- if length(gMAathStr) < 3 then
- set gMAathStr to string("0" & gMAcurrAthNum)
- end if
- if gMALev <> 2 then
- set theChar to char 1 of gMAcurrAth
- set N to 1
- set vMAblankCount to 0
- repeat while theChar <> EMPTY
- puppetSprite(N + gMAlowLetterSprite - 1, 1)
- if char N of gMAcurrAth = " " then
- set the castNum of sprite (N + gMAlowLetterSprite - 1) to cast string("blank")
- set vMAblankCount to vMAblankCount + 1
- else
- set the castNum of sprite (N + gMAlowLetterSprite - 1) to cast string("dash")
- end if
- if gMALev < 2 then
- set the loc of sprite (N + gMAlowLetterSprite - 1) to point(5 + (N * 33), 459)
- end if
- if gMALev > 2 then
- set the loc of sprite (N + gMAlowLetterSprite - 1) to point(5 + (N * 33), 1000)
- end if
- set N to N + 1
- set theChar to char N of gMAcurrAth
- end repeat
- end if
- if gMALev = 2 then
- set theChar to char 1 of gMAspacelessName
- set N to 1
- set vMAblankCount to 0
- repeat while theChar <> EMPTY
- puppetSprite(N + gMAlowLetterSprite - 1, 1)
- set the castNum of sprite (N + gMAlowLetterSprite - 1) to cast string("dash")
- set the loc of sprite (N + gMAlowLetterSprite - 1) to point(5 + (N * 33), 459)
- set N to N + 1
- set theChar to char N of gMAspacelessName
- end repeat
- end if
- set gMAcurNameLength to N - 1 - vMAblankCount
- set gMAblanks to vMAblankCount
- end
-
- on setUpCards MAnewGame
- global uniquePairList, MAuniqueIconList, gMAcurNameLength, MArandomGridlist, MAanswergridList, MAclearedGrid, MAcharList, gMAcurrAth, gMAspacelessName, gMALev, MAuniqCharList
- if MAnewGame = 1 then
- set MAcharList to []
- set vMAcharNums to length(gMAspacelessName)
- repeat with vMAi = 1 to vMAcharNums
- append(MAcharList, char vMAi of gMAspacelessName)
- end repeat
- set vMAnum to length(gMAspacelessName)
- set MAuniqCharList to []
- repeat with vMAi = 1 to vMAnum
- set vChr to char vMAi of gMAspacelessName
- set vFlag to 1
- repeat with vMAn = vMAi - 1 down to 1
- if vChr = char vMAn of gMAspacelessName then
- set vFlag to 0
- exit repeat
- end if
- end repeat
- if vFlag then
- add(MAuniqCharList, vChr)
- end if
- end repeat
- MAdoUniqueIconList()
- set MArandomGridlist to makeRandomGrid(count(MAuniqueIconList))
- set MAanswergridList to makeAnswerGridList(MArandomGridlist)
- end if
- repeat with N = 1 to count(MAuniqueIconList)
- set a to 0
- set X to 0
- repeat while a = 0
- set X to X + 1
- set a to getAt(MArandomGridlist, X)
- if a = N then
- set a to X
- next repeat
- end if
- set a to 0
- end repeat
- set b to 0
- repeat while b = 0
- set X to X + 1
- set b to getAt(MArandomGridlist, X)
- if b = N then
- set b to X
- next repeat
- end if
- set b to 0
- end repeat
- if getAt(MAclearedGrid, a) = 1 then
- set num to getAt(getAt(MAanimList, integer(char 8 of the name of cast getAt(MAuniqueIconList, N))), 1)
- MAsetTile(a, num)
- MAsetTile(b, num)
- end if
- end repeat
- end
-
- on MAputStates
- global MASavedList, gMAmenu, MAflavor, gMALev, gMAflip, gMAsound, gMAcurrAth, gMAcurrAthNum, MAunusedAthList, MAuniqueIconList, MArandomGridlist, MAanswergridList, gMAgameMarker, MAnewGame
- set MASavedList to []
- setAt(MASavedList, 1, gMAmenu)
- setAt(MASavedList, 2, MAflavor)
- setAt(MASavedList, 3, gMALev)
- setAt(MASavedList, 4, gMAflip)
- setAt(MASavedList, 5, gMAsound)
- setAt(MASavedList, 6, gMAcurrAth)
- setAt(MASavedList, 7, gMAcurrAthNum)
- setAt(MASavedList, 8, MAunusedAthList)
- setAt(MASavedList, 9, MAuniqueIconList)
- setAt(MASavedList, 10, MArandomGridlist)
- setAt(MASavedList, 11, MAanswergridList)
- setAt(MASavedList, 12, gMAgameMarker)
- setAt(MASavedList, 13, MAnewGame)
- end
-
- on MAgetStates
- global MASavedList, MAnewGame, gMAmenu, MAflavor, gMALev, gMAflip, gMAsound, gMAcurrAth, gMAcurrAthNum, MAunusedAthList, MAuniqueIconList, MArandomGridlist, MAanswergridList, gMAgameMarker
- set gMAmenu to getAt(MASavedList, 1)
- set MAflavor to getAt(MASavedList, 2)
- set gMALev to getAt(MASavedList, 3)
- set gMAflip to getAt(MASavedList, 4)
- set gMAsound to getAt(MASavedList, 5)
- set gMAcurrAth to getAt(MASavedList, 6)
- set gMAcurrAthNum to getAt(MASavedList, 7)
- set MAunusedAthList to getAt(MASavedList, 8)
- set MAuniqueIconList to getAt(MASavedList, 9)
- set MArandomGridlist to getAt(MASavedList, 10)
- set MAanswergridList to getAt(MASavedList, 11)
- set gMAgameMarker to getAt(MASavedList, 12)
- set MAnewGame to getAt(MASavedList, 13)
- if MAnewGame = 0 then
- MAresumeGame()
- else
- MAinitGame()
- end if
- end
-
- on MAleaveGame
- global gMAmatch
- MAallOFF()
- set gMAmatch to EMPTY
- MAputStates()
- cleanUp()
- end
-
- on MAresumeGame
- go("gameFrame")
- goSetUp(0)
- setUpCards(0)
- MAshowLetters()
- end
-
- on cleanUp
- global MASavedList
- DisableIdleAnim()
- HSStatePut("MA", "savedList", string(MASavedList))
- end
-